package com.game;

import android.graphics.Bitmap;
import android.graphics.Canvas;

public class AlertBox {
	
	private Bitmap m_Shade, m_Box;
	private Button m_Yes, m_No;
	
	public AlertBox(Bitmap shade, Bitmap box, Button yes, Button no)
	{
		m_Shade = shade;
		m_Box = box;
		
		m_Yes = yes;
		m_No = no;
	}
	
	public void Draw(Canvas canvas)
	{
		canvas.drawBitmap(m_Shade, 0, 0, null);
		canvas.drawBitmap(m_Box, 76, 76, null);
		m_Yes.Draw(canvas);
		m_No.Draw(canvas);
	}
	
	public int HandleTouch(int x, int y)
	{
		m_Yes.TryTouch(x, y);
		m_No.TryTouch(x, y);
		
		if(m_Yes.Used()) return 1;
		if(m_No.Used()) return 0;
		
		return -1;
	}
}
